package com.tangtanwei.hotel.controller;

import com.tangtanwei.hotel.entity.UserRoomNumber;
import com.tangtanwei.hotel.service.UserRoomNumberService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/userNumber")
public class UserRoomNumberController {

    private UserRoomNumberService userRoomNumberService;

    // 查看每个用户分配了哪些房间  keyword是可以根据用户名搜索用户
    @RequestMapping("/all")
    public List<UserRoomNumber> getALl(String userId, String keyword){
        return userRoomNumberService.getAll(userId,keyword);
    }


}
